﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ConsultarPessoa.aspx.cs" Inherits="SisVenda.Web.Restrito.ConsultarPessoa" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Panel runat="server" ID="pnlPesquisa" SkinID="Pesquisa" DefaultButton="btnPesquisar" GroupingText="Consulta de Cliente">
        <table class="filtros">
            <tr>
                <td class="rotuloFiltro">
                    <asp:RadioButtonList ID="rblCle_TipoPessoa" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="F">Física</asp:ListItem>
                        <asp:ListItem Value="J">Jurídica</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="rotuloFiltro">
                    CPF/CNPJ:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxCle_CpfCnpj" ValidationGroup="Pesquisa" SkinID="CpfCnpj"
                        MaxLength="18"></asp:TextBox>
                    <act:MaskedEditExtender ID="tbxCle_CpfCnpj_MaskedEditExtender" runat="server" 
                        CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" SkinID="CpfCnpj" 
                        CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                        CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" 
                        TargetControlID="tbxCle_CpfCnpj">
                    </act:MaskedEditExtender>
                </td>
                <td class="rotuloFiltro">
                    Nome:
                </td>
                <td>
                    <asp:TextBox runat="server" ID="tbxCle_Nome" MaxLength="70" ValidationGroup="Pesquisa"
                        Width="200px"></asp:TextBox>
                </td>
                <td class="rotuloFiltro">
                    Linhas:
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlLinhas" SkinID="Paginacao" 
                        AutoPostBack="True">
                    </asp:DropDownList>
                </td>
                <td align="right">
                    <asp:Button ID="btnPesquisar" runat="server" SkinID="Pesquisar" 
                        ValidationGroup="Pesquisa" onclick="btnPesquisar_Click"/>
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvwCle_Cliente" runat="server"
            DataKeyNames="pes_Id" AutoGenerateColumns="False"
            SkinID="SemSelect" DataSourceID="odsCliente">
            <Columns>
            <asp:BoundField DataField="pes_id" HeaderText="Código" />
            <asp:BoundField DataField="pes_nome" HeaderText="Nome" />
            <asp:BoundField DataField="pes_telefone" HeaderText="Telefone" />
                <asp:TemplateField HeaderText="Ações">
                    <ItemTemplate>
                        <asp:ImageButton ID="ibnExibir" runat="server" ToolTip="Exibir" SkinID="AcaoExibir"
                            CommandName="Exibir" />
                        <asp:ImageButton ID="ibnAlterar" runat="server" ToolTip="Alterar" SkinID="AcaoAlterar"
                            CommandName="Alterar" />
                    </ItemTemplate>
                    <ItemStyle Width="100px" HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsCliente" runat="server" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="ObterPessoa" 
            TypeName="SisVenda.Web.Restrito.Fn.ConsultarPessoaFn">
        </asp:ObjectDataSource>
</asp:Panel>

</asp:Content>
